{% extends "bootstrap/base.html" %}

{% block title %}Flask_Sqlachemy_RESTfulAPI_Codegen{% endblock %}

{% block styles %}
    {{ super() }}
    <link rel="stylesheet" href="../static/css/global.css">
    <link rel="stylesheet" href="../static/css/build.css">
    <script>
        window.onload = function () {
            {% if not log_data %}
                window.location.href = "/build";
                document.getElementById('building').innerText = "生成中..";
                document.getElementById('progress').style.display = "block";
            {% endif %}

        }
    </script>
{% endblock %}

{% block content %}
    <div class="panel panel-primary">
        <div class="panel-heading">
            <h3 class="panel-title">Flask_Sqlachemy_RESTfulAPI_Codegen</h3>
        </div>
        <div class="panel-body">
            <h2 id="building">生成成功</h2>
        </div>

        <div class="panel-body container-body">
            <!--进度条-->
            <div class="progress progress-striped active" id="progress" style="display: none">
                <div class="progress-bar progress-bar-success" role="progressbar"
                     aria-valuenow="60" aria-valuemin="0" aria-valuemax="100"
                     style="width: 40%;">
                </div>
            </div>

            <pre class="build-code">
                {{ log_data }}
            </pre>
        </div>
        <div class="panel-footer">
        </div>
    </div>
{% endblock %}